import request from '@/utils/request.ts'

const PREFIX = '/article'
const POST_URL = '/'


export const GetAllArticleSync = async () => {
    return await request.get(PREFIX + POST_URL)
}

export const updateArticle = async (data: any) => {
    return await request.put(PREFIX + POST_URL + data.articleId, data)
}

export const addArticle = async (data: any) => {
    return await request.post(PREFIX + POST_URL, data)
}

export const deleteArticleSync = async (articleIds: any) => {
    return await request.delete(PREFIX + POST_URL, {data: articleIds})
}